package com.ostrich.cloud.ostrichGoodsService.client;

import com.ostrich.cloud.common.result.PageResult;
import com.ostrich.cloud.ostrichGoodsSercice.model.Dto.SalesDto;
import com.ostrich.cloud.ostrichGoodsSercice.model.param.AddSalesParam;
import com.ostrich.cloud.ostrichGoodsSercice.model.param.GetSalesParam;
import io.swagger.annotations.ApiOperation;
import org.omg.CORBA.INTERNAL;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

@FeignClient(contextId = "salesClient",name="ostrichGoodsService")
public interface SalesClient {

    @PostMapping("addSales")
    @ApiOperation("添加流水接口")
    public boolean addSales(@RequestBody @Valid AddSalesParam param);

    @PutMapping("putSales")
    @ApiOperation("修改流水状态接口")
    public boolean putSales(@RequestParam("orderNo")Long orderNo);


    @GetMapping("getAllSales")
    @ApiOperation("查询全部流水接口")
    public PageResult<SalesDto> getAllSalesDto(@RequestParam("current")Integer current,@RequestParam("size")Integer size);

    @PostMapping("conditionsQuerySales")
    @ApiOperation("日期查询流水接口")
    public PageResult<SalesDto> conditionsQuerySales(@RequestBody @Valid GetSalesParam param);

}
